﻿using login.dal;
using login.model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace login1.bll
{
    public class LoginInfoBll
    {
        private LoginInfoDal loginInfodal = new LoginInfoDal();
        
        public bool Login(string name,string password)
        {
            return loginInfodal.Login(name, password)!=null?true:false;
        }
        public List<people> GetPeople()
        {
            return loginInfodal.GetPeople();
        }
        public bool UpdateByid(string str)
        {
            return loginInfodal.UpdateById(str) > 0 ;
        }
        public bool DeleteByid()
        {
            return loginInfodal.DeleteByid("LLL")>0;
        }
        public bool Add()
        {
            people people = new people();
            people.username = "LLL";
            people.password = "123456";
            return loginInfodal.Add(people)>0;
        }
    }
}
